﻿using System;
using System.Collections.Generic;
using Color = System.Drawing.Color;
using SwinGame;

namespace Jumpman.src
{
    public class GameController
    {
        private Mario player;

        public Mario Player
        {
            get { return player; }
            set { player = value; }
        }

        private Stage currentStage;

        public Stage CurrentStage
        {
            get { return currentStage; }
            set { currentStage = value; }
        }

       private StageLoader mainLoader = new StageLoader();

        public StageLoader MainLoader
        {
            get { return mainLoader; }
            set { mainLoader = value; }
        }

        

        public GameController()
        {
            
            mainLoader.SetBackgroundImage(Resources.LoadBitmap("MenuBG.jpg"));
            mainLoader.SetBackGroundMusic(Audio.LoadMusic("menu.ogg"));

            MenuSelector menuSel = new MenuSelector();
            
            mainLoader.AddDrawable(menuSel);
            mainLoader.AddUpdatable(menuSel);
            
           // MainLoader.SetStageMap(Resources.LoadMap("level1.sga"));
            mainLoader.CreateStage(this);
        }

        public void Update()
        {
            currentStage.Update(this);
        }

        public void Draw()
        {            
            currentStage.Draw(this);
        }

    }
}
